SQL stored procedures and parameter fields

Seagate Crystal Reports supports designing reports based on stored procedures in SQL databases. Additionally, the Report Designer allows you to create parameter fields in the report itself. Both stored procedures and parameter fields can prompt users at runtime for a value to base the report on. For example, a salesperson may want to only see sales information for their region. When they request the report, the report can prompt the salesperson to enter a region name. The report then delivers data just for that region.

To prevent users from specifying their own values for parameter fields or stored procedures, use the PROMPT# command when specifying the URL of a report. PROMPT# lets you specify values for one or more parameter fields in a report. Alternately, you can design your own web-based forms that accept user input and dynamically create the URL that includes the PROMPT# parameter and value.

Note:    Users should not surround parameter values with quotation marks. All values are sent to the report as strings, regardless of the type of data. Parameters that expect numeric values interpret the string received when necessary.

The Web Component Server does not validate any parameter values you specify for stored procedures or parameter fields. If the value you pass to the parameter is invalid, passing text information when a number is expected, for example, an error is not returned to the web browser. In addition, the Web Component Server does not allow you to change the format expected by parameters. Be sure to test any web site that accesses reports with stored procedures or parameter fields before allowing users to request such reports.

Note:    Parameter fields and SQL stored procedures limit the effectiveness of report caching and job sharing. Since each report containing stored procedures or parameter fields may generate a different set of data every time it is requested, multiple requests for the same report may not be distributable among multiple users.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com